QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Alpha Gain filter

kAlphaGainImageFilterType ('gain')

The alpha gain filter is used to alter the alpha channel of a single source. This operation is commonly applied before passing the source to the alpha compositor effect described above. The following equation describes the alteration that is made to the source's alpha channel:

newAlpha = bottomPin <= (gain*oldAlpha + offset) <= topPin

This means that to increase the alpha channel by a set amount, you set the gain parameter to 1.0, and the offset to the desired increase. Similarly, to increase the alpha channel by a fixed percentage, set the offset to 0.0 and the gain to the percentage increase desired. The topPin and bottomPin parameters allow you to set upper and lower bounds on the value of the alpha channel, respectively.

The alpha gain filter effect takes a maximum of one source and has four parameters.

Parameters

Use the descriptions below to help you understand what the parameters do. To learn how to use parameter atoms, see "Adding Video Effects to a QuickTime Movie"

Name

Code

QTAtom Type

Description

Gain value

'gain'

kParameterTypeDataFixed

This value is multiplied by the original alpha channel value.

Offset value

'offs'

kParameterTypeDataFixed

This value is added to the old alpha channel, after it has been multiplied by the gain parameter.

Top alpha pin

'pinT'

kParameterTypeDataFixed

The maximum value that the alpha channel can take after the gain and offset parameters have been applied.

Bottom alpha pin

'pinB'

kParameterTypeDataFixed

The minimum value that the alpha channel can take after the gain and offset parameters have been applied.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |